﻿using System.Collections.Generic;

namespace SR.ExpressionEvaluator.Lib
{
    public enum ExpressionTypes
    {
        Literal,
        Boolean,
        String,
        Operand,
        Function,
        Variable,
        Error
    }

    public delegate void ExpressionPartFoundHandler(string expressionPart, ExpressionTypes type);

    public interface IEvaluator
    {
        Dictionary<string, object> Variables { get; set; }

        T Evaluate<T>(string expr);

        bool Validate(string expr);

        Dictionary<string, string> GetProbables(string str);

        event ExpressionPartFoundHandler ExpressionPartFound;
    }
}
